// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_BPT_APPLICATION_ITEM
// * CreateDate    : 2012-1-4 11:58:52
// * Creater       : CodeSmith
// * LastChangeDate: 2012-1-4 11:58:52
// * LastChanger   : 2012-1-4 11:58:52
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class BptApplicationItemEntity : EntityBase
    {
        public BptApplicationItemTable TableSchema
        {
            get
            {
                return BptApplicationItemTable.Current;
            }
        }

        public BptApplicationItemEntity()
        {

        }

        public BptApplicationItemEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.ApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ITEM_ID"]));
            this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
            this.PlanApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_APPLICATION_ITEM_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.DeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_DATE"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.ProductSpecIn = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SPEC_IN"]));
            this.ProductSpecOut = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SPEC_OUT"]));
            this.Material = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL"]));
            this.DiameterOut = Convert.ToDecimal(CommonFunctions.ToObject(dr["DIAMETER_OUT"]));
            this.DiameterIn = Convert.ToDecimal(CommonFunctions.ToObject(dr["DIAMETER_IN"]));
            this.Length = Convert.ToDecimal(CommonFunctions.ToObject(dr["LENGTH"]));
            this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["UNIT"]));
            this.RepRegisterItemId = Convert.ToString(CommonFunctions.ToObject(dr["REP_REGISTER_ITEM_ID"]));
        }

        public BptApplicationItemEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.ApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ITEM_ID"]));
            this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
            this.PlanApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_APPLICATION_ITEM_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.DeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_DATE"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.ProductSpecIn = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SPEC_IN"]));
            this.ProductSpecOut = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SPEC_OUT"]));
            this.Material = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL"]));
            this.DiameterOut = Convert.ToDecimal(CommonFunctions.ToObject(dr["DIAMETER_OUT"]));
            this.DiameterIn = Convert.ToDecimal(CommonFunctions.ToObject(dr["DIAMETER_IN"]));
            this.Length = Convert.ToDecimal(CommonFunctions.ToObject(dr["LENGTH"]));
            this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["UNIT"]));
            this.RepRegisterItemId = Convert.ToString(CommonFunctions.ToObject(dr["REP_REGISTER_ITEM_ID"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return BptApplicationItemTable.Current;
            }
        }

        #region Perporty List
        public string ApplicationItemId
        {
            get { return Convert.ToString(GetData(BptApplicationItemTable.C_APPLICATION_ITEM_ID)); }
            set { SetData(BptApplicationItemTable.C_APPLICATION_ITEM_ID, value); }
        }

        public string ApplicationId
        {
            get { return Convert.ToString(GetData(BptApplicationItemTable.C_APPLICATION_ID)); }
            set { SetData(BptApplicationItemTable.C_APPLICATION_ID, value); }
        }

        public string PlanApplicationItemId
        {
            get { return Convert.ToString(GetData(BptApplicationItemTable.C_PLAN_APPLICATION_ITEM_ID)); }
            set { SetData(BptApplicationItemTable.C_PLAN_APPLICATION_ITEM_ID, value); }
        }

        public string ProductId
        {
            get { return Convert.ToString(GetData(BptApplicationItemTable.C_PRODUCT_ID)); }
            set { SetData(BptApplicationItemTable.C_PRODUCT_ID, value); }
        }

        public DateTime DeliveryDate
        {
            get { return Convert.ToDateTime(GetData(BptApplicationItemTable.C_DELIVERY_DATE)); }
            set { SetData(BptApplicationItemTable.C_DELIVERY_DATE, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(BptApplicationItemTable.C_REMARK)); }
            set { SetData(BptApplicationItemTable.C_REMARK, value); }
        }

        public string ProductSpecIn
        {
            get { return Convert.ToString(GetData(BptApplicationItemTable.C_PRODUCT_SPEC_IN)); }
            set { SetData(BptApplicationItemTable.C_PRODUCT_SPEC_IN, value); }
        }

        public string ProductSpecOut
        {
            get { return Convert.ToString(GetData(BptApplicationItemTable.C_PRODUCT_SPEC_OUT)); }
            set { SetData(BptApplicationItemTable.C_PRODUCT_SPEC_OUT, value); }
        }

        public string Material
        {
            get { return Convert.ToString(GetData(BptApplicationItemTable.C_MATERIAL)); }
            set { SetData(BptApplicationItemTable.C_MATERIAL, value); }
        }

        public decimal DiameterOut
        {
            get { return Convert.ToDecimal(GetData(BptApplicationItemTable.C_DIAMETER_OUT)); }
            set { SetData(BptApplicationItemTable.C_DIAMETER_OUT, value); }
        }

        public decimal DiameterIn
        {
            get { return Convert.ToDecimal(GetData(BptApplicationItemTable.C_DIAMETER_IN)); }
            set { SetData(BptApplicationItemTable.C_DIAMETER_IN, value); }
        }

        public decimal Length
        {
            get { return Convert.ToDecimal(GetData(BptApplicationItemTable.C_LENGTH)); }
            set { SetData(BptApplicationItemTable.C_LENGTH, value); }
        }

        public string Unit
        {
            get { return Convert.ToString(GetData(BptApplicationItemTable.C_UNIT)); }
            set { SetData(BptApplicationItemTable.C_UNIT, value); }
        }

        public string RepRegisterItemId
        {
            get { return Convert.ToString(GetData(BptApplicationItemTable.C_REP_REGISTER_ITEM_ID)); }
            set { SetData(BptApplicationItemTable.C_REP_REGISTER_ITEM_ID, value); }
        }

        #endregion
    }


}

